/*     */ package com.newcrm.webapi;
/*     */ 
/*     */ import com.newcrm.bean.User;
/*     */ import com.newcrm.exception.NotFoundException;
/*     */ import com.newcrm.util.ParameterUtil;
/*     */ import com.newcrm.webapi.sub.ShowCustomerChart;
/*     */ import com.newcrm.webapi.sub.ShowCustomerTotalNumChart;
/*     */ import com.newcrm.webapi.sub.ShowDealChart;
/*     */ import com.newcrm.webapi.sub.ShowDealMoneyChart;
/*     */ import java.io.IOException;
/*     */ import javax.servlet.RequestDispatcher;
/*     */ import javax.servlet.ServletException;
/*     */ import javax.servlet.http.HttpServletRequest;
/*     */ import javax.servlet.http.HttpServletResponse;
/*     */ 
/*     */ public class Report extends AbstractHttpServlet
/*     */ {
/*     */   private static final long serialVersionUID = -3948417930754154120L;
/*     */ 
/*     */   public void doGet(HttpServletRequest request, HttpServletResponse response)
/*     */     throws ServletException, IOException
/*     */   {
/*  52 */     if (!checkLogin(request)) {
/*  53 */       super.showLoginPage(request, response);
/*  54 */       return;
/*     */     }
/*     */ 
/*  57 */     User u = super.getLoginUser(request);
/*  58 */     if ((!u.isAdmin) && (!u.isGroupAdmin)) {
/*  59 */       response.sendRedirect(request.getContextPath() + 
/*  60 */         "/nopermission.jsp");
/*  61 */       return;
/*     */     }
/*     */ 
/*  64 */     String url = request.getRequestURI();
/*  65 */     String[] param = ParameterUtil.getParameters(url, getTagkey());
/*     */ 
/*  67 */     if ((param == null) || (param.length == 0)) {
/*  68 */       request.getRequestDispatcher("/report.jsp").forward(request, 
/*  69 */         response);
/*  70 */       return;
/*     */     }
/*     */     try {
/*  73 */       if ((param.length == 2) && 
/*  74 */         ("chart".equals(param[0])))
/*     */       {
/*  76 */         if ("deal".equals(param[1])) {
/*  77 */           new ShowDealChart(this).parse(request, response);
/*  78 */           return;
/*     */         }
/*     */ 
/*  82 */         if ("dealMoney".equals(param[1])) {
/*  83 */           new ShowDealMoneyChart(this).parse(request, response);
/*  84 */           return;
/*     */         }
/*     */ 
/*  88 */         if ("customer".equals(param[1])) {
/*  89 */           new ShowCustomerChart(this).parse(request, response);
/*  90 */           return;
/*     */         }
/*     */ 
/* 101 */         if ("customerTotalNum".equals(param[1])) {
/* 102 */           new ShowCustomerTotalNumChart(this).parse(request, 
/* 103 */             response);
/* 104 */           return;
/*     */         }
/*     */ 
/*     */       }
/*     */ 
/*     */     }
/*     */     catch (NotFoundException e)
/*     */     {
/* 123 */       super.showErrorMessage(response, "");
/* 124 */       return;
/*     */     }
/* 126 */     super.doGet(request, response);
/*     */   }
/*     */ 
/*     */   protected AbstractAction getAddAction()
/*     */   {
/* 131 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getDeleteAction(String id)
/*     */   {
/* 136 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getListAction()
/*     */   {
/* 141 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getShowAction(String id)
/*     */   {
/* 146 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getShowAddPageAction()
/*     */   {
/* 151 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getShowConfirmDestroyAction(String id)
/*     */   {
/* 156 */     return null;
/*     */   }
/*     */ 
/*     */   protected AbstractAction getShowUpdatePageAction(String id)
/*     */   {
/* 161 */     return null;
/*     */   }
/*     */ 
/*     */   protected String getTagkey()
/*     */   {
/* 166 */     return "/report";
/*     */   }
/*     */ 
/*     */   protected AbstractAction getUpdateAction(String id)
/*     */   {
/* 171 */     return null;
/*     */   }
/*     */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.Report
 * JD-Core Version:    0.6.1
 */